package com.ctfo.ulcp.exp.utils;

import lombok.Data;

@Data
public class ColumnDefinition {
    private String name;
    private String comment;
    private String type;

    private Object sampleData;

    @SuppressWarnings("unused")
    public String sample() {
        return switch (sampleData) {
            case Number ignored -> sampleData.toString();
            case String s -> s.length() < 20 ? s : s.substring(0, 20);
            case null, default -> "";
        };
    }
}
